<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue.js</title>
    <link rel="stylesheet" href="style.css"/>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<!--vue-app是根容器-->
<div id="vue-app">
    <h1> 键盘 Events</h1>
    <label>姓名:</label>
    <!--kedown: 键盘按下触发-->
    <!--keyup.enter: 点击回车触发-->
    <input type="text" @keyup="logName" @keydown="ageKeyDown" @keyup.enter="login" @keyup.alt.enter="altEnter"/>
    <label>年龄:</label>
    <input type="text" v-on:keyup="logAge"/>
</div>

<script src="app.js"></script>
</body>
</html>